const mongoose = require("mongoose");
mongoose.pluralize(null); //去掉集合后面的s
const { Schema, model } = mongoose;
const versionKey = { versionKey: false };
const moment = require("moment");
moment.locale("zh-cn");

// 目的地：当地玩法
const LocalSchema = new Schema(
  {
    image: String, //图标
    categories: String, //分类
    color: String, //颜色值
  },
  versionKey
);

// 目的地界面选择城市，左边的国家分类
const CountrySchema = new Schema(
  {
    country: String, //国家
    type: String, //类型
  },
  versionKey
);

// 目的地界面选择城市，右边的国家
const CitySchema = new Schema(
  {
    image: String, //图片地址
    city: String, //城市
    type: String, //类型
  },
  versionKey
);

module.exports = {
  modelLocal: model("localgameplay", LocalSchema),
  modelCity: model("city", CitySchema),
  modelCountry: model("country", CountrySchema),
};
